package cn.iocoder.yudao.module.wine.dal.mysql.config;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wine.dal.dataobject.config.WineConfigDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wine.controller.admin.config.vo.*;

/**
 * 平台配置 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface WineConfigMapper extends BaseMapperX<WineConfigDO> {

    default PageResult<WineConfigDO> selectPage(ConfigPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WineConfigDO>()
                .eqIfPresent(WineConfigDO::getIsAudit, reqVO.getIsAudit())
                .betweenIfPresent(WineConfigDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WineConfigDO::getId));
    }

}
